package com.hex.ds.hdrs.cron.vo.vo;

import cn.hutool.core.util.StrUtil;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * @Package: com.hex.ds.hdrs.cron.vo.vo
 * @ClassName CronTaskDefQueryVo
 * @Description: 定时任务查询VO对象
 * @Author: wz.li
 * @Date 2023/4/3 14:22
 * @Version v2.0.2
 **/
@Data
@Accessors(chain = true)
public class CronTaskDefQueryVo implements Serializable {

    private String appCode;

    private String taskCode;

    private String taskCodeFuzzy;

    private String taskName;

    private String taskStatus;

    private String batchTag;

    private List<String> pkIds;

    private String taskCodeAndName;

    public String getTaskCodeAndName() {
        if (StrUtil.isNotBlank(taskCodeAndName)){
            return taskCodeAndName.toUpperCase();
        }
        return taskCodeAndName;
    }

    public String getTaskCodeFuzzy() {
        if (StrUtil.isNotBlank(taskCodeFuzzy)){
            return taskCodeFuzzy.toUpperCase();
        }
        return taskCodeFuzzy;
    }
}
